package com.yby.common.exception;

/**
 * 错误码和错误信息定义类
 */

public enum ExceptionCodeEnum {
    UNKNOW_EXCEPTION(10000,"系统未知异常"),
    NULLPOINTEREXCEPTION(10001,"空指针异常"),
    CLASSCASTEXCEPTION(10002,"类型强制转换异常"),
    NEGATIVEARRAYEXCEPTION(10003,"数组负下标异常"),
    ARRAYINDEXOUTOFBOUNDSEXCEPTION(10004,"数组下标越界异常"),
    SQLEXCEPTION(10005,"Sql语句执行异常"),
    NOSUCHMETHODEXCEPTION(10006,"方法不存在"),
    INDEXOUTOFBOUNDSEXCEPTION(10007,"索引越界异常"),
    NUMBERFORMATEXCEPTION(10008,"数字格式异常"),
    ILLEGALARGUMENTEXCEPTION(10009,"方法参数错误"),
    ILLEGALACCESSEXCEPTION(10010,"无访问权限异常");



    private int code;

    private String msg;

    ExceptionCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
